[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Int 21 Fn 5D0B  OU - DOS 4.x Only Internal - Get Dos Swappable Data Areas  [D]

   AX = 5D0Bh

Return: CF set on error
       AX = error code (see AH=59h)
   CF clear if successful
       DS:SI -> swappable data area list (see below)

Notes: copying and restoring the swappable data areas allows DOS to be
     reentered unless it is in a critical section delimited by calls to
     INT 2A/AH=80h and INT 2A/AH=81h,82h
   SHARE and other DOS utilities consult the byte at offset 04h in the
     DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
     in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
   DOS 5+ use the SDA format listed below, but revert back to the DOS 3.x
     call for finding the SDA (see AX=5D06h)

See Also: AX=5D06h,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h,INT 2F/AX=1203h

Format of DOS 4.x swappable data area list:
Offset Size    Description
 00h   WORD    count of data areas
 02h  N BYTEs  "count" copies of data area record
       Offset  Size    Description
        00h    DWORD   address
        04h    WORD    length and type
               bit 15 set if swap always, clear if swap in DOS
               bits 14-0: length in bytes

Format of DOS 4.0-6.0 swappable data area:
Offset Size    Description
 -34   BYTE    printer echo flag (00h off, FFh active)
 -31   BYTE    current switch character (ignored by DOS 5+)
 -28   BYTE    incremented on each INT 21/AX=5E01h call
 -27 16 BYTEs  machine name set by INT 21/AX=5E01h
 -11  5 WORDs  zero-terminated list of offsets which need to be patched to
       enable critical-section calls (see INT 2A/AH=80h)
       (all offsets are 0D0Ch, but this list is still present for
       DOS 3.x compatibility)
 -1    BYTE    unused padding
---start of actual SDA---
 00h   BYTE    critical error flag ("ErrorMode")
 01h   BYTE    InDOS flag (count of active INT 21 calls)
 02h   BYTE    drive on which current critical error occurred or FFh
 03h   BYTE    locus of last error
 04h   WORD    extended error code of last error
 06h   BYTE    suggested action for last error
 07h   BYTE    class of last error
 08h   DWORD   ES:DI pointer for last error
 0Ch   DWORD   current DTA
 10h   WORD    current PSP
 12h   WORD    stores SP across an INT 23
 14h   WORD    return code from last process termination (zerod after reading
       with AH=4Dh)
 16h   BYTE    current drive
 17h   BYTE    extended break flag
 18h   BYTE    flag: code page switching
 19h   BYTE    flag: copy of previous byte in case of INT 24 Abort
---remainder need only be swapped if in DOS---
 1Ah   WORD    value of AX on call to INT 21
 1Ch   WORD    PSP segment for sharing/network
 1Eh   WORD    network machine number for sharing/network (0000h = us)
 20h   WORD    first usable memory block found when allocating memory
 22h   WORD    best usable memory block found when allocating memory
 24h   WORD    last usable memory block found when allocating memory
 26h   WORD    memory size in paragraphs (used only during initialization)
 28h   WORD    last entry checked during directory search
 2Ah   BYTE    flag: nonzero if INT 24 Fail
 2Bh   BYTE    flags: allowable INT 24 responses (passed to INT 24 in AH)
 2Ch   BYTE    flag: do not set directory if nonzero
 2Dh   BYTE    flag: program aborted by  (_r..XCN_..|v{} :{vvum:.wx.~~.~:xv{tqi:st:\YX.:(\r..XCN_..j{~~st}:2otoi.~3.:)*r..XCN_..~{c:u|:wutnr.:)+r..XCN_..wutnr.:)(r..MUH..c.{h:7:+#"*.:).r..MUH..towx.h:u|:~{ci:isty.:+7+7+#"*.:),r..XCN_..~{c:u|:m..q:2*:':Iot~{c3.:)-r..XCN_..|v{} :yutiuv.:im{jj.~:~ohst}:h.{~:|huw:~.lsy..:)"r..XCN_..|v{} :i{|.:nu:y{vv:STN:(":s|:tut`.hu.:)#r..XCN_..|v{} :{xuhn:yohh.tnvc:st:jhu}h.ii6:noht:STN:(.:[xuhn:stnu:\{sv.:)[r:)*:XCN_i::~.lsy.:~hsl.h:h.ko.in:r.{~.h:2i..:STN:(\5[B'*"*(r3:|u.-|...
 2Eh   BYTE    flag: allow embedded blanks in FCB
 2Fh   BYTE    padding (unused)
 30h   BYTE    day of month
 31h   BYTE    month
 32h   WORD    year - 1980
 34h   WORD    number of days since 1-1-1980
 36h   BYTE    day of week (0 = Sunday)
 37h   BYTE    flag: console swapped during read from device
 38h   BYTE    flag: safe to call INT 28 if nonzero
 39h   BYTE    flag: abort currently in progress, turn INT 24 Abort into Fail
 3Ah 30 BYTEs  device driver request header (see INT 2F/AX=0802h) for
       device calls
 58h   DWORD   pointer to device driver entry point (used in calling driver)
 5Ch 22 BYTEs  device driver request header for I/O calls
 72h 14 BYTEs  device driver request header for disk status check
 80h   DWORD   pointer to device I/O buffer
 84h   WORD    ???
 86h   WORD    ??? (0)
 88h   BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
 89h   DWORD   start offset of file region to lock/unlock
 8Dh   DWORD   length of file region to lock/unlock
 91h   BYTE    padding (unused)
 92h  3 BYTEs  24-bit user number (see AH=30h)
 95h   BYTE    OEM number (see AH=30h)
 96h  6 BYTEs  CLOCK$ transfer record (see AH=52h)
 9Ch   BYTE    device I/O buffer for single-byte I/O functions???
 9Dh   BYTE    padding???
 9Eh 128 BYTEs buffer for filename
11Eh 128 BYTEs buffer for filename
19Eh 21 BYTEs  findfirst/findnext search data block (see AH=4Eh)
1B3h 32 BYTEs  directory entry for found file (see AH=11h)
1D3h 88 BYTEs  copy of current directory structure for drive being accessed
22Bh 11 BYTEs  FCB-format filename for device name comparison
236h   BYTE    terminating NUL for above filename
237h 11 BYTEs  wildcard destination specification for rename (FCB format)
242h   BYTE    terminating NUL for above spec
243h   BYTE    ???
244h   WORD    ???
246h  5 BYTEs  ???
24Bh   BYTE    extended FCB file attributes
24Ch   BYTE    type of FCB (00h regular, FFh extended)
24Dh   BYTE    directory search attributes
24Eh   BYTE    file open/access mode
24Fh   BYTE    ??? flag bits
250h   BYTE    flag: device name found on rename, or file not found
251h   BYTE    splice flag??? (file name and directory name together)
252h   BYTE    flag indicating how DOS function was invoked
       (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
253h   BYTE    ???
254h   BYTE    ???
255h   BYTE    ???
256h   BYTE    ???
257h   BYTE    ???
258h   BYTE    ???
259h   BYTE    ???
25Ah   BYTE    canonicalized filename referred to existing file/dir if FFh
25Bh   BYTE    ???
25Ch   BYTE    type of process termination (00h-03h)
25Dh   BYTE    ???
25Eh   BYTE    ???
25Fh   BYTE    ???
260h   DWORD   pointer to Drive Parameter Block for critical error invocation
264h   DWORD   pointer to stack frame containing user registers on INT 21
268h   WORD    stores SP???
26Ah   DWORD   pointer to DOS Drive Parameter Block for ???
26Eh   WORD    segment of disk buffer
270h   WORD    ???
272h   WORD    ???
274h   WORD    ???
276h   WORD    ???
278h   BYTE    Media ID byte returned by AH=1Bh,1Ch
279h   BYTE    ??? (doesn't seem to be referenced)
27Ah   DWORD   pointer to ???
27Eh   DWORD   pointer to current SFT
282h   DWORD   pointer to current directory structure for drive being accessed
286h   DWORD   pointer to caller's FCB
28Ah   WORD    SFT index to which file being opened will refer
28Ch   WORD    temporary storage for file handle
28Eh   DWORD   pointer to a JFT entry in process handle table (see AH=26h)
292h   WORD    offset in DOS DS of first filename argument
294h   WORD    offset in DOS DS of second filename argument
296h   WORD    ???
298h   WORD    ???
29Ah   WORD    ???
29Ch   WORD    ???
29Eh   WORD    ???
2A0h   WORD    ???
2A2h   WORD    ??? directory cluster number???
2A4h   DWORD   ???
2A8h   DWORD   ???
2ACh   WORD    ???
2AEh   DWORD   offset in file???
2B2h   WORD    ???
2B4h   WORD    bytes in partial sector
2B6h   WORD    number of sectors
2B8h   WORD    ???
2BAh   WORD    ???
2BCh   WORD    ???
2BEh   DWORD   number of bytes appended to file
2C2h   DWORD   pointer to ??? disk buffer
2C6h   DWORD   pointer to ??? SFT
2CAh   WORD    used by INT 21 dispatcher to store caller's BX
2CCh   WORD    used by INT 21 dispatcher to store caller's DS
2CEh   WORD    temporary storage while saving/restoring caller's registers
2D0h   DWORD   pointer to prev call frame (offset 264h) if INT 21 reentered
       also switched to for duration of INT 24
2D4h   WORD    open mode/action for INT 21/AX=6C00h
2D6h   BYTE    ??? (set to 00h by INT 21h dispatcher, 02h when a read is
       performed, and 01h or 03h by INT 21/AX=6C00h)
2D7h   WORD    ??? apparently unused
2D9h   DWORD   stored ES:DI for AX=6C00h
2DDh   WORD    extended file open action code (see AX=6C00h)
2DFh   WORD    extended file open attributes (see AX=6C00h)
2E1h   WORD    extended file open file mode (see AX=6C00h)
2E3h   DWORD   pointer to filename to open (see AX=6C00h)
2E7h   WORD    ???
2E9h   WORD    ???
2EBh   BYTE    ???
2ECh   WORD    stores DS during call to [List-of-Lists + 37h]
2EEh   WORD    ???
2F0h   BYTE    ???
2F1h   WORD    ??? bit flags
2F3h   DWORD   pointer to user-supplied filename
2F7h   DWORD   pointer to ???
2FBh   WORD    stores SS during call to [List-of-Lists + 37h]
2FDh   WORD    stores SP during call to [List-of-Lists + 37h]
2FFh   BYTE    flag, nonzero if stack switched in calling [List-of-Lists+37h]
300h 21 BYTEs  FindFirst search data for source file(s) of a rename operation
       (see AH=4Eh)
315h 32 BYTEs  directory entry for file being renamed (see AH=11h)
335h 331 BYTEs critical error stack
480h 384 BYTEs disk stack (functions greater than 0Ch, INT 25,INT 26)
600h 384 BYTEs character I/O stack (functions 01h through 0Ch)
780h   BYTE    device driver lookahead flag (usually printer) (see AH=64h)
781h   BYTE    volume change flag
782h   BYTE    flag: virtual open
783h   BYTE    ???
784h   WORD    ???
786h   WORD    ???
788h   WORD    ???
78Ah   WORD    ???

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson